using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmBorrowDtls")]
    public class BorrowDtls
    {
        public BorrowDtls()
        {
            this.ItemRess = new HashSet<Borrow>();
        }

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "BorrowDtlsId", ResourceType = typeof(Resources.BorrowDtlsResource))]
        public int BorrowDtlsId { get; set; }

		[ForeignKey("Borrow")]
		[DataMember, Display(Name = "BorrowId", ResourceType = typeof(Resources.BorrowDtlsResource))]
        public Nullable<int> BorrowId { get; set; }

        [ForeignKey("ItemRes")]
		[DataMember, Display(Name = "ItemResId", ResourceType = typeof(Resources.BorrowDtlsResource))]
        public Nullable<int> ItemResId { get; set; }

		[DataMember, Display(Name = "Qty", ResourceType = typeof(Resources.BorrowDtlsResource))]
        public Nullable<decimal> Qty { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.BorrowDtlsResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.BorrowDtlsResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.BorrowDtlsResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.BorrowDtlsResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        [DataMember, Display(Name = "ICollection<Borrow>", ResourceType = typeof(Resources.BidRouteResource))]
        public virtual ICollection<Borrow> ItemRess { get; set; }

        [DataMember]
        public virtual Borrow Borrow { get; set; }
    }
}